/*
 * common_test.cc
 *
 *  Created on: Mar 27, 2012
 *      Author: yexijiang
 */

#include "../../src/common/common.h"

using namespace std;
using namespace event;

void TestSplit()
{
	FILE *pf = fopen("/proc/meminfo", "r");
	char buf[1024];
	fread(buf, sizeof(char), 1024, pf);
	fclose(pf);
	vector<string> vecs;
	Split(buf, '\n', vecs);
	for(size_t i = 0; i < vecs.size(); ++i)
		fprintf(stderr, "%ld: %s\n", i, vecs[i].c_str());
}

int main(void)
{
	TestSplit();
}


